<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <script language="javascript" type="text/javascript">
  	function check(){
  		if(document.form.pass.value=="")
  		{
  			alert("请输入密码");
  			return false;
  		}
  		if(document.form.cpass.value!=document.form.pass.value)
  		{
  			alert("对不起2次密码输入的不同");
  			return true;
  		}
  		
  	}
  </script>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index3.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <h1>请填写表单信息</h1>
    <form action="dealindex3.jsp" method="post">
    	用户名：<input type="text" name="name"><br>
    	密码：<input type="password" name="pass"><br>
    	确认密码：<input type="password"name="cpass"><br>
    	性别：<input type="radio" value="男" name="gender" >男
			<input type="radio" value="女 name="gender" >女<br>
		爱好:<input type="checkbox" name="favorite" value="体育"> 体育 &nbsp;  
        <input type="checkbox" name="favorite" value="音乐"> 音乐 &nbsp; 
        <input type="checkbox" name="favorite" value="美术"> 美术 &nbsp;  
        <input type="checkbox" name="favorite" value="旅游"> 旅游&nbsp; 
        <br>
        
	<input type="submit" value="提交" onClick="return check()">
	<input type="reset" value="重置">
    <hr>
    该表单信息将提交给deal。jsp页面，deal。jsp使用EL表达式获取表单信息。
    </form>
    
  

  </body>
</html>
